<script>
import { h } from 'vue'
import { useRoute, useRouter } from 'vue-router'
export default {
  name: 'Redirect',
  setup() {
    const route = useRoute()
    const router = useRouter()

    const { params, query } = route
    const { path } = params

    router.replace({ path: '/' + path, query })
  },
  render: function() {
    return h()
  }
}
</script>
